import request from '@/utils/request'

// 查询加盟列表
export function listCooperate(query) {
  return request({
    url: '/finance/cooperate/list',
    method: 'get',
    params: query
  })
}

// 查询加盟详细
export function getCooperate(cooperateId) {
  return request({
    url: '/finance/cooperate/' + cooperateId,
    method: 'get'
  })
}

// 新增加盟
export function addCooperate(data) {
  return request({
    url: '/finance/cooperate',
    method: 'post',
    data: data
  })
}

// 修改加盟
export function updateCooperate(data) {
  return request({
    url: '/finance/cooperate',
    method: 'put',
    data: data
  })
}

// 删除加盟
export function delCooperate(cooperateId) {
  return request({
    url: '/finance/cooperate/' + cooperateId,
    method: 'delete'
  })
}